package com.piggy.system.api;

import com.piggy.common.core.constant.SecurityConstants;
import com.piggy.common.core.constant.ServiceNameConstants;
import com.piggy.common.core.web.domain.AjaxResult;
import com.piggy.system.api.domain.FlowNode;
import com.piggy.common.core.domain.R;
import com.piggy.system.api.domain.SysConfig;
import com.piggy.system.api.factory.RemoteMenuFallbackFactory;
import com.piggy.system.api.factory.RemoteRoleFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
 * 角色服务
 *
 * @author shark
 */
@FeignClient(contextId = "remoteMenuService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteMenuFallbackFactory.class)
public interface RemoteMenuService {

    @GetMapping("/menu/button/{userId}")
    List<Long> getButtonIdsByUserId(@PathVariable(value = "userId") Long userId , @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @GetMapping("/menu/getListFlowNode")
    List<FlowNode> getListFlowNode(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
